<!DOCTYPE html>
<html>
<head>
<title>index</title>
</head>
<body>
	<div class="container">
	<div class="grid ">
		<div class="row">
			<div class="span4 notice bg-grayLighter  marker-on-right">
				<h2>
					<i class="${appType.icon} on-left"></i> <strong>${project.projectName}</strong>
				</h2>
				<p>${project.intro}</p>
				<p><small>${project.createDate?datetime}</small></p>			
			
			</div>
			<div class="span8">
				<table class="table bordered striped hovered green">
					<thead>
						<tr class="bg-cyan fg-white">
							<th class="text-center">版本</th>
							<th class="text-center">操作</th>
							<th class="text-center">更多</th>
						</tr>
					</thead>
					<tbody>
						<#list pageBean.objList as item >
						<tr>
							<td class="text-center"><strong class="">${item.version}</strong></td>
							<td class="text-center">
								<#if (appType.intro) = 'android' >
									<button class="inverse e_download " id="${item.appFile}">下载安装</button> 
								<#elseif  (appType.intro) = 'ios' >
									<button class="inverse e_install " url="${item.iosAppend}">点击安装</button>
								</#if>
							</td>
							<td class="text-center">
								<button class="inverse e_show " id="${item.id}">详情</button>
							</td>
						</tr>
						</#list>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	</div>
<script type="text/javascript">
	$(function(){
		$(".e_show").click(function(){
			
				window.location = "${base}/f/"+$(this).attr("id")+"/show";
			
		})
		
		$(".e_download").click(function(){
			if(confirm("确定立即下载?")){
				window.location = "${base}/f/d/"+$(this).attr("id");
			}
		})
		
		$(".e_install").click(function(){
			if(confirm("确定立即安装?")){
				window.location = "itms-services://?action=download-manifest&url="+$(this).attr("url");
			}
		})
	})
</script>	
</body>
</html>
